package com.mingqijia.gassafety.webserver.response.workorder.mbp;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mingqijia.gassafety.shared.utils.commonUtils.PageUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
public class InfoAndAlertLogResponse {

    private String imei;

    @ApiModelProperty("注册时间")
    private String registerTime;

    @ApiModelProperty(value = "注册状态：1已注册 0未注册")
    private Integer registerStatus;

    @ApiModelProperty(value = "设备状态 0-离线,1-正常,2-低报,3-高报,4-故障,6-报警")
    private Integer deviceStatus;

    @ApiModelProperty(value = "设备状态说明")
    private String deviceStatusMsg;

    @ApiModelProperty("报警记录")
    PageUtil<AlertLogVO> alertLog;

    @ApiModelProperty("是否为控制器,1-是，0-不是")
    Integer isController;

    @Data
    public static class AlertLogVO{

        @ApiModelProperty(value = "报警开始时间：格式-2022-01-21 11:26:56")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
        private Date warningStartTime;

        @ApiModelProperty(value = "报警持续时长:例子-00:00:30")
        private String warningDuration;

        @ApiModelProperty(value = "报警浓度")
        private Integer concentration;

    }

}
